
import axios from '@/functions/request';
function getList(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysrole/doGetList",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function addItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysrole/doSaveRole",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function deleteItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysrole/doDelRole",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })
    
}
function editItem(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysrole/doModRole",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })

}
function showUser(params){
    return new Promise((resolve, reject)=>{
        axios.formPost( "/api/auth/sysrole/doGetListWithRoleId",params).then(res=>{
            resolve(res)
        }).catch(e => {
            reject(e)
        });
    })

}
export {
    getList,
    deleteItem,
    addItem,
    editItem,
    showUser
}